<?php defined('SEJUJOPEFDNGJSL') or exit('Access denied');?>
<style type="text/css">
.aui_footer{display: none}
</style>
<?php 
$jjlerver=array("普通会员","创业董事","联席董事","首席董事");
?>
<?php require("topbut.php") ?>
<!-- <div class="right_center">我的开通记录<a href="<?php echo $GLOBALARR['curl']?>" style="color:red;">返回</a></div> -->
<style type="text/css">
    .givetable tr th{text-align: center!important;padding:8px 0;font-size: 14px;font-weight: 900;}
    .givetable tr td{text-align: center!important;padding:5px 0;font-size: 12px;}
</style>
<div class="panel panel-inverse">
    <div class="panel-heading">
        <div class="row">
            <div class="col-md-6">
                <h4 class="panel-title">我的直推</h4>
            </div>
            <div class="col-md-6 text-right">
              
            </div>
        </div>
    </div>
    <div class="panel-body">
        <div class="table-responsive">
            <table  border="0" cellpadding="0" cellspacing="0" style="margin-top:5px;" class="table table-bordered table-striped givetable" align="center">
              <tbody>
                <tr>
                    <th>序号</th>
                    <th>账号</th>
                    <th>姓名</th>
                    <th>级别</th>
                    <th>联系电话</th>

                    <th>注册时间</th>
                </tr>
            <?php

            $pagecount=10;
            $condition=" where 1=1 and introducer_id=".$_userid."  ";
            $psql="select count(0) from ld_user_account $condition";
            $db->query($psql,3);
            $pcount=$db->fval;
            $pagecount=$pagecount;   //每页条数
            $astr="&lsact=mypush";    //Url
            $pagearr=pagelist($pagecount,$pcount,$astr);
            $offset=$pagearr[1];

            $sql="select * from ld_user_account $condition order by id desc limit $offset,$pagecount";
            $db->query($sql);
            $rs=$db->rs;
            $ii=0;
            foreach ($rs as $k => $v) {
              $ii++;
              $serialid=($pagearr[2]-1)*$pagecount+$ii;
              $rm=$member->getum($v['uname'],'real_name,phone');
            ?>
                <tr>
                    <td ><?php echo $serialid?></td>
                    <td><?php echo $v['uname']?></td>
                    <td><?php echo $rm['real_name']?></td>
                    <td><?php echo $jjlerver[$v['user_jjlever']]?></td>
                    <td><?php echo $rm['phone']?></td>
                    <td><?php echo formatdate($v['regist_time'])?></td>
                </tr>
            <?php
            }
            ?>
              </tbody>
            </table>
        </div>
    </div>
</div>

<?php if(($pcount/$pagecount)>1){?>
<div class="pagediv"><?php echo $pagearr[0]?></div>
<?php }?>
<?php if($pcount==0){?>
<div class="pagediv" style="text-align:center;color:#E47501">--> 暂无数据</div>

<?php
}

?>